package Demo1;
class Aminal1 {
    public void display() {
        System.out.println("Animal");
    }
}
class Cat1 extends Aminal1 {
    public void display() {
        System.out.println("Cat");
    }
}
class Dog1 extends Aminal1 {

}

public class Test_1 {
    public static void main(String[] args) {
        Aminal1 aminal1 = new Aminal1();
        Aminal1 aminal2 = new Cat1();
        Aminal1 aminal3 = new Dog1();

        aminal1.display();
        aminal2.display();
        aminal3.display();
    }
}
